<?php

namespace app\common\model\info;
use app\common\model\BaseModel;
use app\common\model\user\User;

class AdTask extends BaseModel
{

    public static function tablePK(): ?string
    {
        return 'task_id';
    }

    public static function tableName(): string
    {
        return 'ad_task';
    }

    public function user()
    {
        return $this->hasOne(User::class,'uid','uid');
    }

    public function getImagesAttr($value)
    {
        return $value ? explode(',',$value) : [];
    }

}